﻿@model ICollection<CleverCMS.Cms.Data.Entities.CmsLog>

@section TitleContent
{
    Logs
}

<div class="widget green">
    <div class="widget-title">
        <h4><i class="icon-reorder"></i> Logs</h4>
    </div>
    <div class="widget-body">
        <div id="jtable-div">
        </div>
    </div>
</div>

<script type="text/javascript">
    $(document).ready(function() {
        $('#jtable-div').jtable({
            paging: true,
            pageSize: 12,
            gotoPageArea: 'none',
            pageSizeChangeArea: false,
            defaultSorting: 'Date DESC',
            selectOnRowClick: false,
            actions: {
                listAction: '@Url.Action("ListLogs", "Monitor")'
            },
            fields: {
                Id: {
                    title: 'Id',
                    key: true,
                    create: false,
                    edit: false,
                    list: true,
                    width: '3%'
                },
                Date: {
                    title: 'Date',
                    width: '10%'
                },
                Level: {
                    title: 'Level',
                    width: '10%'
                },
                Logger: {
                    title: 'Logger',
                    width: '7%'
                },
                Message: {
                    title: 'Message',
                    width: '20%'
                },
                Exception: {
                    title: 'Exception',
                    width: '53%'
                }
            }
        });

        $('#jtable-div').jtable('load');
    });
</script>